package com.zm.feign;

import com.zm.bean.User;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.cloud.openfeign.SpringQueryMap;
import org.springframework.stereotype.Component;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;

@Component
@FeignClient(name = "eureka-client")
@RequestMapping("/test")
public interface EurekaClientInterface {
    @RequestMapping("/get")
    public String get();

    @RequestMapping("/user/{id}")
    public User findById(@PathVariable Long id);


    @RequestMapping("/save")
    public String saveUser(@SpringQueryMap User user);
}
